<%@ page
        contentType="text/html;charset=UTF-8" %>
<%@ include
        file="/webpage/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>买家添加</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet"
          type="text/css"
          href="${ctxStatic}/plugin/layui-v225/css/layui.css">
    <style>
        .wrap{
            padding: 18px 26px;
        }
    </style>
</head>
<body class="childrenBody">
<div class="wrap">
    <form class="layui-form">
    <table class="layui-table">
        <tbody>
        <tr>
            <th width="120">父级分类：</th>
            <td>
                <div class="layui-input-inline">
                <select name="TagGroup_Id">
                    <option value="0">==顶级分类==</option>
                    @foreach($data as $d)
                    <option value="{{$d->Id}}">{{$d->Name}}</option>
                    @endforeach
                </select>
                </div>
            </td>
            <th rowspan="3" width="320px">
                    <div class="layui-upload-drag" id="upload">
                        <i class="layui-icon"></i>
                        <p>点击上传logo，或将文件拖拽到此处</p>
                    </div>
            </th>
        </tr>
        <tr>
            <th>分类名称</th>
            <td>
                <div class="layui-input-inline">
                    <input type="text" name="number" autocomplete="off" class="layui-input">
                </div>
                <%--<input type="text" name="title" required lay-verify="required" placeholder="请输入分类名称"  class="layui-input">--%>

                <span>分类名称必须填写</span>
            </td>
        </tr>
        <tr>
            <th>分类标题：</th>
            <td>
                <div class="layui-input-inline">
                    <input type="text" name="number" autocomplete="off" class="layui-input">
                </div>
                <%--<input type="text" name="title" required lay-verify="required" placeholder="请输入分类标题" autocomplete="off" class="layui-input">--%>
                <span>分类标题必须填写</span>
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" class="layui-btn"
                       value="提交">
                <input type="button"   class="layui-btn back" onclick="history.go(-1)" value="返回">
            </td>
            <td></td>
        </tr>
        </tbody>
    </table>
</form>
</div>
<script>
    <%--定义js路径--%>
    var js_path="${ctxStatic}/dfcshop/js/admin/";
    var data_path="${ctxStatic}/dfcshop/data/";
</script>
<script type="text/javascript"
        src="${ctxStatic}/plugin/layui-v225/layui.js"></script>
<script type="text/javascript"
        src="${ctxStatic}/dfcshop/js/admin/create_buyer.js"></script>
    <script>
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;
        //拖拽上传
        upload.render({
            elem: '#upload'
            ,url: '/upload/'
            ,done: function(res){
                console.log(res)
            }
        });
    });
</script>
</body>
</html>